<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta http-equiv="Content-Language" content="UTF-8">
        <script language="javascript" type="text/javascript" src="/pub/share/js/roads.js">
<?php
//$link = new Mysqli('127.0.0.1', 'root', '123456', 'keepdoing');
//$link->query("SET NAMES 'utf8'");
//$script = "var fscsddt = {};";
//$script .= "fscsddt.provinces={";
//$result = $link->query("select distinct substring(id, 1, 2) as `id`, province_name as `name` from foundation_road");
//while ($row = $result->fetch_assoc()) {
//    $script .= "'".$row['id']."':'".$row['name']."',";
//};
//$script = substr($script, 0, -1)."};";
//
//$script .= "fscsddt.cities={";
//$result = $link->query("select distinct substring(id, 1, 4) as `id`, city_name as `name` from foundation_road");
//while ($row = $result->fetch_assoc()) {
//    $script .= "'".$row['id']."':'".$row['name']."',";
//};
//$script = substr($script, 0, -1)."};";
//
//
//$script .= "fscsddt.districts={";
//$result = $link->query("select distinct substring(id, 1, 6) as `id`, district_name as `name` from foundation_road");
//while ($row = $result->fetch_assoc()) {
//    $script .= "'".$row['id']."':'".$row['name']."',";
//};
//$script = substr($script, 0, -1)."};";
//
//$script .= "fscsddt.towns={";
//$result = $link->query("select distinct substring(id, 1, 8) as `id`, townstreet_name as `name` from foundation_road");
//while ($row = $result->fetch_assoc()) {
//    $script .= "'".$row['id']."':'".$row['name']."',";
//};
//$script = substr($script, 0, -1)."};";
//
//$script .= "fscsddt.roads={";
//$result = $link->query("select distinct id, road_name as `name` from foundation_road");
//while ($row = $result->fetch_assoc()) {
//    $script .= "'".$row['id']."':'".$row['name']."',";
//};
//$script = substr($script, 0, -1)."};";
//echo $script;
?>
    </script>
    </head>
    <body>
<?php
//$link = new Mysqli('127.0.0.1', 'root', '123456', 'keepdoing');
//$link->query("SET NAMES 'utf8'");
//$script = "var fscsddt = {};";
//$script .= "fscsddt.provinces={";
//$result = $link->query("select distinct substring(id, 1, 2) as `id`, province_name as `name` from foundation_road");
//while ($row = $result->fetch_assoc()) {
//    $script .= "'".$row['id']."':'".$row['name']."',";
//};
//$script = substr($script, 0, -1)."};";
//
//$script .= "fscsddt.cities={";
//$result = $link->query("select distinct substring(id, 1, 4) as `id`, city_name as `name` from foundation_road");
//while ($row = $result->fetch_assoc()) {
//    $script .= "'".$row['id']."':'".$row['name']."',";
//};
//$script = substr($script, 0, -1)."};";
//
//
//$script .= "fscsddt.districts={";
//$result = $link->query("select distinct substring(id, 1, 6) as `id`, district_name as `name` from foundation_road");
//while ($row = $result->fetch_assoc()) {
//    $script .= "'".$row['id']."':'".$row['name']."',";
//};
//$script = substr($script, 0, -1)."};";
//
//$script .= "fscsddt.towns={";
//$result = $link->query("select distinct substring(id, 1, 8) as `id`, townstreet_name as `name` from foundation_road");
//while ($row = $result->fetch_assoc()) {
//    $script .= "'".$row['id']."':'".$row['name']."',";
//};
//$script = substr($script, 0, -1)."};";
//
//$script .= "fscsddt.roads={";
//$result = $link->query("select distinct id, road_name as `name` from foundation_road");
//while ($row = $result->fetch_assoc()) {
//    $script .= "'".$row['id']."':'".$row['name']."',";
//};
//$script = substr($script, 0, -1)."};";
//echo $script;
?>
    </body>
</html>